# Nginx

FROM            10.0.16.125:5080/general/ubuntu:16.04
MAINTAINER      Lijc lijc@siccs.cn
# install deb
RUN             apt-get update && apt-get -y install nginx
# import nginx config file
RUN             rm -f /etc/nginx/nginx.conf
ADD             nginx.conf /etc/nginx
RUN             sed -i '/^daemon/d' /etc/nginx/nginx.conf
# create persistent volume directory
RUN             mkdir /opt/pv
RUN             cd /opt/pv && mkdir -p nginx_log
RUN             rm -rf /var/log/nginx
RUN             ln -s /opt/pv/nginx_log /var/log/nginx
# import docker entry script
ADD             docker-entrypoint /opt/
RUN             chmod 0755 /opt/docker-entrypoint
EXPOSE          80
CMD             /opt/docker-entrypoint

